#!/bin/bash
count = 0	 
for FILE in $1/*.mp3; do
  let "count = count + 1"
  # do something with $FILE
#   echo "File: $FILE" | sed -e 's/\//\n/g'
  set -- "$FILE"
  IFS="/"; declare -a Array=($*)
    
    namefile=$(echo "${Array[${#Array[@]} - 1]}")
    title=$(echo "${Array[${#Array[@]} - 1]}" | sed  's/\.mp3//g'  )
    album="Get Psyched Mix"
    author="Barney Stinson"
    echo $title
    id3v2 -D "$namefile"
    id3v2 -t "$title" -A "$album" -a "$author" -T "$count" "$namefile"
done
